﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="resource.aspx.cs" Inherits="Web.resource" %>

<%@ Register Src="~/controls/head.ascx" TagPrefix="uc1" TagName="head" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <uc1:head runat="server" ID="head" />
        <div class="content">
            <div class="file_right">
                <div class="bigclass">
                    <dt>软件类别</dt>
                    <dd>
                        <asp:ListView ID="ListView2" runat="server" ItemPlaceholderID="fileclasshold" OnItemCommand="ListView2_ItemCommand">
                            <LayoutTemplate>
                                <div runat="server" id="fileclasshold"></div>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <div style="height: 20px;">
                                    <asp:LinkButton ID="LinkButton1" CommandName="selected" CommandArgument='<%#Eval("ID")%>' Text=' <%#Eval("class_name")%>' runat="server"><%#Eval("class_name")%>  </asp:LinkButton>&nbsp;&nbsp;&nbsp;软件个数：<%#Eval("class_count")%>个

                                </div>
                            </ItemTemplate>
                        </asp:ListView>

                    </dd>
                    <div class="line-dot"></div>
                    <dt>TOP 10热点排行</dt>
                    <dd>
                        <asp:ListView ID="ListView3" runat="server" ItemPlaceholderID="top10">
                            <LayoutTemplate>
                                <div id="top10" runat="server">
                                </div>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <div class="line-dot"></div>
                                <a href="Download.aspx?Id=<%#Eval("ID")%>" target="_blank"><%#Eval("file_name")%></a>
                            </ItemTemplate>
                        </asp:ListView>
                    </dd>

                    <div class="line-dot"></div>
                    <dt>文件上传</dt>
                    <dd>文件类别：<asp:DropDownList ID="DropDownList1" runat="server" DataTextField="class_name" DataValueField="ID" DataSourceID="SqlDataSource1"></asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Mystudy_testConnectionString %>" SelectCommand="SELECT * FROM [tb_file_class]"></asp:SqlDataSource>
                        <asp:FileUpload ID="FileUpload1" runat="server" />
                        <asp:Button ID="bt_fileUp" runat="server" Text="上传" />
                    </dd>

                </div>
            </div>
            <div class="file_left">
                <div class="file_list_title">
                    <strong>
                        <asp:Label ID="file_list" runat="server" Text=""></asp:Label>软件列表表</strong>
                </div>
                <asp:ListView ID="ListView1" runat="server" ItemPlaceholderID="hold" DataSourceID="SqlfileSource">
                    <LayoutTemplate>
                        <div runat="server" id="hold"></div>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <div class="line-dot"></div>
                        <div class="file">
                            <div class="file_soft_title">
                                <strong><a href="Download.aspx?Id=<%#Eval("ID")%>" target="_blank"><%#Eval("file_name")%></a> </strong>
                            </div>
                            <div class="file_left_left">
                                <a>
                                    <img src="<%#Eval("file_iconurl")%>" />
                                </a>
                            </div>
                            <div class="file_left_right">
                                <p><%#Eval("content")%></p>
                            </div>
                            <div class="file_dowload">点击文件名下载该文件</div>
                        </div>
                    </ItemTemplate>
                </asp:ListView>

                <asp:SqlDataSource ID="SqlfileSource" runat="server" ConnectionString="<%$ConnectionStrings:Mystudy_testConnectionString %>" SelectCommand="SELECT * FROM [tb_file] WHERE ([class_id] = @class_id)">
                    <SelectParameters>
                        <asp:SessionParameter Name="class_id" SessionField="FCID" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>

            </div>

        </div>
    </form>
</body>
</html>
